package exercise5;

/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2214st2215
 * @Package: exercise5
 * @File: Person.java
 * @Time: 2023/3/7 15:10
 * @Author: abcque
 * @Description:
 * @Modifier:
 * @ModifyDate:
 * @ModifyRemark:
 */
public class Person {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if ((0 <= age) && (age <= 130)) {
            this.age = age;
        } else {
            System.out.println("您设置的年龄超过了范围");
        }
    }
}
